#pragma once

#include <vector>

template<size_t N>
class BitSet
{
public:
	BitSet()
	{
		_bs.resize(N / 32 + 1, 0);
	}
	void set(size_t num)
	{
		int i = num / 32;
		int j = num % 32;
		_bs[i] |= 1 << j;
	}
	void reset(size_t num)
	{
		int i = num / 32;
		int j = num % 32;
		_bs[i] &= ~(1 << j);
	}
	bool test(size_t num)
	{
		int i = num / 32;
		int j = num % 32;
		return _bs[i] & (1 << j);
	}
private:
	std::vector<int> _bs;
};